-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support MERGE for MySQL connector #24428
Conversation
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java
Show resolved
Hide resolved
b4e8e08
to
c0b86ce
Compare
Is there a test verifying error message when executing MERGE statement on table without primary keys? |
a4d84a0
to
3deed31
Compare
537b087
to
1146ad7
Compare
This pull request has gone a while without any activity. Tagging for triage help: @mosabua |
d20d159
to
5b93e35
Compare
Dont forget the docs update .. should be an easy one line include now .. |
5b93e35
to
d25cda3
Compare
Thank you @chenjian2664 |
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlFailureRecoveryTest.java
Outdated
Show resolved
Hide resolved
...ysql/src/test/java/io/trino/plugin/mysql/TestMySqlGlobalTransactionMyConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...ysql/src/test/java/io/trino/plugin/mysql/TestMySqlGlobalTransactionMyConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...ysql/src/test/java/io/trino/plugin/mysql/TestMySqlGlobalTransactionMyConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClient.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/main/java/io/trino/plugin/mysql/MySqlClient.java
Outdated
Show resolved
Hide resolved
35191c2
to
527676b
Compare
Could you rebase on master to resolve conflicts? |
527676b
to
a19e07c
Compare
Note that CI is failing due to JDK version up #24786 |
Oh, yes, just notice that, are we working on finding a new timezone? |
Co-Authored-By: Yuya Ebihara <[email protected]>
if (matcher.matches()) { | ||
String type = matcher.group(1).toLowerCase(Locale.ENGLISH); | ||
if (type.contains("varchar") || type.contains("char")) { | ||
// Mysql requires the primary keys must hava a fixed length, here use the 255 length that is just long enough for the test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the length is insufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are exactly the same prefix(255) data and final in the case is try:
- insert into target, then meet the
Duplicate entry xx for ...
error. - update/delete target, then test fails with wrong assert of update count and the expected data.
Description
The tests that are updated in the
BaseJdbcConnectorTest
because current the implementation of MERGE for Mysql connector requires the table has primary keys, thus modified the table creation logic to usecreateTestTableForWrites
, allowing the MySQL connector test class to override it and add primary keys as needed.Release notes